package com.acwing.chapter3;


import java.io.*;

/**
 * @author anan
 * @create 2021-08-30 21:09
 */
public class StringHash {
    private static int pp = 13331;
    private static int N = 100010;
    private static long[] p = new long[N];
    private static long[] h = new long[N];

    private static long hashNum(int l, int r){
        return h[r] - h[l - 1] * p[r - l + 1];
    }

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));
        String[] str1 = reader.readLine().split(" ");
        int n = Integer.parseInt(str1[0]);
        int m = Integer.parseInt(str1[1]);

        String[] str2 = reader.readLine().split(" ");
        char[] s = str2[0].toCharArray();
        p[0] = 1;
        for (int i = 1; i <= n; i++) {
            h[i] = h[i-1] * pp + s[i - 1];
            p[i] = p[i - 1] * pp;
        }

        while (m-- > 0){
            String[] str3 = reader.readLine().split(" ");
            int l1 = Integer.parseInt(str3[0]);
            int r1 = Integer.parseInt(str3[1]);
            int l2 = Integer.parseInt(str3[2]);
            int r2 = Integer.parseInt(str3[3]);

            if (hashNum(l1, r1) == hashNum(l2, r2)) writer.write("Yes" + "\n");
            else writer.write("No" + "\n");

        }

        writer.flush();
        writer.close();
        reader.close();

    }

}
